<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>GetFindData</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>
<h1>GetFindData</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">exported functions</a>
</div>

<div class=shortdescr>
The <dfn>GetFindData</dfn> function is called to get the list of files
in the current directory of the file system emulated by the plugin.<br>
(<em>FAR to plugin: "let me look at your file list, allocate the memory yourself :-)"</em>).
</div>

<pre class=syntax>
int WINAPI GetFindData(
  HANDLE hPlugin,
  struct PluginPanelItem **pPanelItem,
  int *pItemsNumber,
  int OpMode
);</pre>

<h3>Parameters</h3>
<div class=descr>

    <div class=dfn>hPlugin</div>
    <div class=dfndescr>Plugin handle returned by <a href="openplugin.html">OpenPlugin</a>
      or <a href="openfileplugin.html">OpenFilePlugin</a>.</div>
    <div class=dfn>pPanelItem</div>
    <div class=dfndescr>Points to a variable that receives the address of a
      <a href="../structures/pluginpanelitem.html">PluginPanelItem</a> structures array.</div>
    <div class=dfn>pItemsNumber</div>
    <div class=dfndescr>Points to a variable that receives the number of
      <strong>PluginPanelItem</strong> structures.</div>
    <div class=dfn>OpMode</div>
    <div class=dfndescr>Combination of the <a href="../defs/operation_mode.html">operation mode</a>
      flags. This function should be ready to process the
      <a href="../defs/operation_mode.html#OPM_FIND">OPM_FIND</a> flag.
    </div>

</div>

<h3>Return value</h3>
<div class=descr>
If the function succeeds, the return value must be TRUE.
If the function fails, FALSE should be returned.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
  <li>The memory for the requested data should be allocated by the plugin.
  Because of that it is important to export the <a href="freefinddata.html">FreeFindData</a>
  function so the allocated memory will be freed when no longer needed.

  <li>If this function returns FALSE, the plugin will be closed.

  <li>In some cases (for example when searching in archives <kbd>Alt-F7</kbd>)
  a panel in not created physically, so it necessary to check the return value of the
  <a href="../service_functions/control.html">Control</a> function, to prevent a crash
  in the most upappropriate moment while carying out work for a none existant panel.

  <li>If you want to prevent your plugin from participating in the "search in archive"
  ("[x] Search in archives" in the Find file dialog) then return FALSE when <var>OpMode</var>
  contains the OPM_FIND flag.

</ol>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="freefinddata.html">FreeFindData</a>
</div>

</body>
</html>